﻿Public Class Registrar_producto
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub BT_atras_Click(ByVal sender As Object, ByVal e As EventArgs) Handles BT_atras.Click
        Response.Redirect("~/Registrar.aspx")
    End Sub

    Protected Sub BT_registrar_Click(ByVal sender As Object, ByVal e As EventArgs) Handles BT_registrar.Click
        Dim datacontex As New DCStorexpressDataContext
        Dim mensaje As MsgBoxResult

        mensaje = MsgBox("¿Desea Guardar Registro?", MsgBoxStyle.OkCancel, "REGISTRO")
        If mensaje = MsgBoxResult.Ok Then
            MsgBox("Registro Guardado")

            datacontex.INSERTAR_PRODUCTO(Me.TB_codigo.Text, Me.TB_producto.Text, Me.TB_valor.Text, Me.TB_cantidad.Text)

            TB_codigo.Text = ""
            TB_producto.Text = ""
            TB_valor.Text = ""
            TB_cantidad.Text = ""
        End If
    End Sub
End Class